
from __future__ import unicode_literals
from django.db import models
from optitrans.domain.chauffeur import Chauffeur
from optitrans.domain.device import Device


class DeviceParam(models.Model):
    id = models.DateTimeField(primary_key=True)
    id_vehicule = models.ForeignKey('Vehicule', db_column='id_vehicule',related_name='vehicule_device_param')
    id_device = models.ForeignKey(Device, db_column='id_device',related_name='device_device_param')
    id_chauffeur = models.ForeignKey(Chauffeur, db_column='id_chauffeur',related_name='chauffeur_device_param')
    uuid_device = models.ForeignKey(Device, db_column='uuid_device',related_name='uuid_set')
    sim_number = models.CharField(max_length=50L, blank=True)
    min_time = models.IntegerField()
    class Meta:
        db_table = 'device_param'
